import Vue from 'vue'
import Router from 'vue-router'
import Login from '../components/Login'
import Index from '../components/Index'
import InfoManager from '../components/InfoManager'
import CourseManager from '../components/CourseManager'
import CoursePlayer from '../components/CoursePlayer'
import CourseLooker from '../components/CourseLooker'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      component: Login
    },
    {
      path: '/Index',
      component: Index,
      children: [
        {
          path: '/InfoManager',
          component: InfoManager
        },
        {
          path: '/CourseManager',
          component: CourseManager
        }
      ]
    },
    {
      path: '/CoursePlayer/:cid',
      component: CoursePlayer
    },
    {
      path: '/CourseLooker/:cid/:token',
      component: CourseLooker
    }
  ]
})
